<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<title>修改房屋信息</title>
<link th:replace="common/header"/>
<script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
<script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
</head>
<body class="no-skin">
	<div th:replace="common/top"/>
	<div class="main-container ace-save-state" id="main-container">
		<div th:replace="common/menu"/>
		<div class="main-content">
			<div class="main-content-inner">
				<div th:replace="common/title"/>
				<div class="page-content">
					<div th:replace="common/skin"/>
					<div class="row">
						<div class="col-xs-12">
							<!-- PAGE CONTENT BEGINS -->
							<form class="form-horizontal" action="add.do" name="form" th:action="@{/houseInfo/edit}" th:method="post" th:object="${houseInfo}">
								<input type="hidden" name="id" id="id" th:value="${id}"/>
								<h3 class="header smaller lighter blue"><i class="fa fa-pencil-square-o" aria-hidden="true"></i>修改房屋信息</h3>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="houseName">房屋名称:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="houseName" id="houseName" class="input_fix" placeholder="房屋名称" th:value="*{houseName}" maxlength="50"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="orientation">朝向:<font style="color:red">*</font></label>
											<div class="controls">
												<select th:field="*{orientation}" id="orientation" name="orientation" class="input_fix9" th:value="*{orientation}">
													<option value="">--请选择--</option>
													<option th:each="orientation : ${T(xyz.ibenben.zhongdian.system.entity.enums.OrientationEnum).values()}" th:value="${orientation}" th:text="${orientation.text}"></option>
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('houseName')}" th:errors="*{houseName}" >Name Error</p>&nbsp;</font>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('orientation')}" th:errors="*{orientation}">Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span12">
										<div class="control-group">
											<label class="control-label" for="roomNumber">卧室-客厅-厨房-卫生间(数量):<font style="color:red">*</font></label>
											<div class="controls">
												<input name="roomNumber" id="roomNumber" class="input_fix3" placeholder="卧室数量" th:value="*{roomNumber}"/>-
												<input name="drawingNumber" id="drawingNumber" class="input_fix3" placeholder="客厅数量" th:value="*{drawingNumber}"/>-
												<input name="kitchenNumber" id="kitchenNumber" class="input_fix3" placeholder="厨房数量" th:value="*{kitchenNumber}"/>-
												<input name="restroomNumber" id="restroomNumber" class="input_fix3" placeholder="卫生间数量" th:value="*{restroomNumber}"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span12">
										<font style="color:red"><span class="input_fix3" th:if="${#fields.hasErrors('roomNumber')}" th:errors="*{roomNumber}">Name Error</span>
										<span class="input_fix3" th:if="${#fields.hasErrors('drawingNumber')}" th:errors="*{drawingNumber}">Name Error</span>
										<span class="input_fix3" th:if="${#fields.hasErrors('kitchenNumber')}" th:errors="*{kitchenNumber}">Name Error</span>
										<span class="input_fix3" th:if="${#fields.hasErrors('restroomNumber')}" th:errors="*{restroomNumber}">Name Error</span>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="houseArea">房屋面积:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="houseArea" id="houseArea" class="input_fix" placeholder="房屋面积" th:value="*{houseArea}"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="polt">所在小区:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="polt" id="polt" class="input_fix" placeholder="所在小区" th:value="*{polt}"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('houseArea')}" th:errors="*{houseArea}">Name Error</p>&nbsp;</font>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('polt')}" th:errors="*{polt}">Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span12">
										<div class="control-group">
											<label class="control-label" for="layer">所在楼层/总楼层:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="layer" id="layer" class="input_fix2" placeholder="所在楼层" th:value="*{layer}"/>/
												<input name="totalLayer" id="totalLayer" class="input_fix2" placeholder="总楼层" th:value="*{totalLayer}"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span12">
										<font style="color:red"><span class="input_fix2" th:if="${#fields.hasErrors('layer')}" th:errors="*{layer}">Name Error</span>
										<span class="input_fix2" th:if="${#fields.hasErrors('totalLayer')}" th:errors="*{totalLayer}">Name Error</span>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="address">详细地址:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="address" id="address" class="input_fix" placeholder="详细地址" th:value="*{address}"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="purpose">住宅用途:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="purpose" id="purpose" class="input_fix" placeholder="住宅用途" th:value="*{purpose}"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('address')}" th:errors="*{address}">Name Error</p>&nbsp;</font>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('purpose')}" th:errors="*{purpose}">Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span12">
										<div class="control-group">
											<label class="control-label" for="province">所在省-所在市-所在区/县/镇:<font style="color:red">*</font></label>
											<div class="controls">
												<select th:field="*{province}" id="province" name="province" class="input_fix9" th:value="*{province}" th:onchange="'provinceChange(this.value, null, \'--请选择--\')'">
													<option value="">--请选择--</option>
													<option th:each="province : ${provinceList}"
														th:value="${province.provinceCode}" th:text="${province.provinceName}">山东</option>
												</select>-
												<select th:field="*{city}" id="city" name="city" class="input_fix9" th:value="*{city}"  th:onchange="'cityChange(this.value, null, \'--请选择--\')'">
													<option value="">--请选择--</option>
													<option th:each="city : ${cityList}"
														th:value="${city.cityCode}" th:text="${city.cityName}">青岛</option>
												</select>-
												<select th:field="*{region}" id="region" name="region" class="input_fix9" th:value="*{region}">
													<option value="">--请选择--</option>
													<option th:each="region : ${regionList}"
														th:value="${region.regionCode}" th:text="${region.regionName}">市北</option>
												</select>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
									<div class="span12">
										<font style="color:red"><span th:if="${#fields.hasErrors('province')}" th:errors="*{province}">Name Error</span>
										<span th:if="${#fields.hasErrors('city')}" th:errors="*{city}">Name Error</span>
										<span th:if="${#fields.hasErrors('region')}" th:errors="*{region}">Name Error</span>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
								<!--PAGE CONTENT BEGINS HERE-->
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="buyTime">购买时间:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="buyTime" id="buyTime" class="input_fix7" placeholder="购买时间" th:value="*{buyTime} == null ? '' : *{#dates.format(buyTime, 'yyyy-MM-dd')}" />
												<img onclick="WdatePicker({el:'buyTime',dateFmt:'yyyy-MM-dd'})" 
												style="width:16px;height:22px" align="middle" th:src="@{/js/My97DatePicker/skin/datePicker.gif}"/>
											</div>
										</div>
									</div>
									<div class="span6">
										<div class="control-group">
											<label class="control-label" for="propertyRight">产权:<font style="color:red">*</font></label>
											<div class="controls">
												<input name="propertyRight" id="propertyRight" class="input_fix" placeholder="产权" th:value="*{propertyRight}"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row-fluid">
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('buyTime')}" th:errors="*{buyTime}">Name Error</p>&nbsp;</font>
									</div>
									<div class="span6">
										<font style="color:red"><p th:if="${#fields.hasErrors('propertyRight')}" th:errors="*{propertyRight}">Name Error</p>&nbsp;</font>
									</div>
								</div>
								<div class="row-fluid">
									<div class="text-center span12">
										<button shiro:hasPermission="/houseInfo/edit" class="btn btn-primary" type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>更新</button>
										<button shiro:hasPermission="/houseInfo/edit" class="btn btn-danger" type="reset"><i class="fa fa-times" aria-hidden="true"></i>取消</button>
										<a shiro:hasPermission="/houseInfo/getall" class="btn" href="getall" th:href="@{/houseInfo/getall}"><i class="fa fa-reply" aria-hidden="true"></i>返回</a>
									</div>
								</div>
							</form>
							<!-- PAGE CONTENT ENDS -->
						</div><!-- /.col -->
					</div><!-- /.row -->
				</div><!-- /.page-content -->
			</div>
		</div><!-- /.main-content -->
		<div th:replace="common/footer"/>
	</div><!-- /.main-container -->
	<div th:replace="common/buttom"/>

	<script type="text/javascript">
		$("form").submit(function(){  
			$(":submit",this).attr("disabled","disabled");  
		}); 
	</script>
</body>
</html>
